package com.mstore.service;

import com.mstore.dao.BalanceDeleteLogDao;
import com.mstore.pojo.BalanceDeleteLog;

public class BalanceDeleteLogService {

	private BalanceDeleteLogDao balanceDeleteLogDao;

	public void save(BalanceDeleteLog balanceDeleteLog) {
		balanceDeleteLogDao.save(balanceDeleteLog);
	}

	public BalanceDeleteLog findById(BalanceDeleteLog balanceDeleteLog) {
		BalanceDeleteLog b = (BalanceDeleteLog) balanceDeleteLogDao
				.findById(balanceDeleteLog);
		if (b != null) {
			b.setLogBalanceTime(b.getLogBalanceTime().substring(0,
					b.getLogBalanceTime().indexOf(".")));
		}
		
		return b;
	}

	public void updateById(BalanceDeleteLog balanceDeleteLog) {
		this.balanceDeleteLogDao.updateById(balanceDeleteLog);
	}

	public BalanceDeleteLogDao getBalanceDeleteLogDao() {
		return balanceDeleteLogDao;
	}

	public void setBalanceDeleteLogDao(BalanceDeleteLogDao balanceDeleteLogDao) {
		this.balanceDeleteLogDao = balanceDeleteLogDao;
	}

}
